def count(n):
    s = 0
    for a in xrange(n):
        for b in xrange(a, n):
            c = n - a - b
            if b > c:
                break
            if a*a + b*b == c * c:
                s += 1
    return s

ans = 0
for i in xrange(5, 1001):
    c = count(i)
    if ans < c:
        ans = c
        print i

